package com.cy.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author : 残影
 * @Date: 2021-02-22 10:25
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("用户表")
public class User {
    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("openid")
    private String openid;

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("头像")
    private String avatarUrl;

    @ApiModelProperty("国家")
    private String country;

    @ApiModelProperty("性别")
    private Integer gender;

    @ApiModelProperty("省")
    private String province;

    @ApiModelProperty("城市")
    private String city;

    @ApiModelProperty("标记获取用户信息的程度（0，未获取；1，部分信息；2，完善信息；3，禁用发布功能）")
    private String haveUserInfo;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createIme;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("预留qq号")
    private String qqNum;

    @ApiModelProperty("预留微信号")
    private String wechatNum;

    @ApiModelProperty("电话号码")
    private String phone;
}
